package com.pmsystem.dao;

import com.pmsystem.pojo.Opinion;
import com.pmsystem.pojo.OpinionExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface OpinionMapper {
    long countByExample(OpinionExample example);

    int deleteByExample(OpinionExample example);

    int deleteByPrimaryKey(Integer opinionId);

    int insert(Opinion record);

    int insertSelective(Opinion record);

    List<Opinion> selectByExample(OpinionExample example);

    Opinion selectByPrimaryKey(Integer opinionId);

    int updateByExampleSelective(@Param("record") Opinion record, @Param("example") OpinionExample example);

    int updateByExample(@Param("record") Opinion record, @Param("example") OpinionExample example);

    int updateByPrimaryKeySelective(Opinion record);

    int updateByPrimaryKey(Opinion record);
    
    /**
     * 
     * <p>Title: solveOpinion</p >  
     * <p>Description: 二级管理员处理反馈</p >  
     * @author 泽强
     * @param opinion
     */
	void solveOpinion(Opinion opinion);

	/**
	 * 
	 * <p>Title: findByUserId</p >  
	 * <p>Description: 根据userId查反馈</p >  
	 * @author 泽强
	 * @param userId
	 * @return
	 */
	List<Opinion> findByUserId(int userId);

	/**
	 * 
	 * <p>Title: findAllOpinion</p >  
	 * <p>Description: 分页查找反馈</p >  
	 * @author 泽强
	 * @param start
	 * @param pageSize
	 * @return
	 */
	List<Opinion> findAllOpinion(int start, Integer pageSize);

	/**
	 * 
	 * <p>Title: findByAdminId</p >  
	 * <p>Description: 根据adminId查反馈</p >  
	 * @author 泽强
	 * @param adminId
	 * @return
	 */
	List<Opinion> findByAdminId(Integer adminId);

	/**
	 * 
	 * <p>Title: findOpinion</p >  
	 * <p>Description: 按一定条件查询反馈，注意SQL语句</p >  
	 * @author 泽强
	 * @param map
	 * @return
	 */
	List<Opinion> findOpinion(Map<String, Object> map);
}